<!DOCTYPE html>
<!-- 声明文档类型,告知浏览器已何种方式解析当前文档 -->
<html lang="en">

<head>
	<meta charset="UTF-8">
	<!-- 声明编码格式,防止页面文本乱码,utf-8国际通用编码,
	中文编码:gb2312 -->
	<title>大朗吃药了</title>
	<!-- title网页标题 -->
	<!-- sublime打开浏览器快捷键F12 -->
</head>

<body>
	<script>


		// console.log((new Array()).constructor.constructor.constructor == (new Array()).constructor)
		// console.log((new Array()).constructor.constructor == Array.constructor)

		// console.log((new Array()).constructor.constructor.constructor);

		// console.log((new Array()).constructor);

		// console.log((new Array()).constructor.constructor);

		// console.log(Array.constructor);
		// console.log(Array);
		// console.log(new Array());

		function A() {
			this.m = 1;
		}
		function B() {
			this.m = 2;
		}
		A.call(B);
		B.call(A);

		function C() {
			this.m = 10
			console.log(this);
		}
		C.call(B)

		var a = new A();
		var b = new B();
		console.log(a.m == B.m);
		console.log(b.m == A.m);
		console.log(a.m);
		console.log(b.m);
		console.log(A.m);
		console.log(B.m);
		console.log(C.m);

		// function rgb(r, g, b) {
		// 	var rNew = "0" + r.toString(16)
		// 	var gNew = "0" + g.toString(16)
		// 	var bNew = "0" + b.toString(16)
		// 	var num = rNew.slice(-2) + gNew.slice(-2) + bNew.slice(-2)
		// 	return "#" + num
		// }
		// console.log(rgb(15, 0, 0));
		// console.log();

		function fun() {
			return function(){
				console.log(1);
			}
		}
		var f = fun()
		var f1 = fun()
		console.log();

	</script>
</body>

</html>